package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @author oxiny
 */
@Data
@ApiModel("订单支付记录表")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("d_order_payment")
public class OrderPayment extends Model<OrderPayment> {
    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer orderId;

    @ApiModelProperty("订单号")
    private String orderNo;

    @ApiModelProperty("支付方式 0微信支付 1免单支付 2卡金支付")
    private Integer payType;

    @ApiModelProperty("第三方付款成功交易号")
    private String tradeNo;

    @ApiModelProperty("请求支付状态 1失败 2成功")
    private Integer postStatus;

    @ApiModelProperty("第三方回调状态 1失败 2成功")
    private Integer returnStatus;

    @ApiModelProperty("实际支付金额")
    private Integer amount;

    @ApiModelProperty("第三方返回错误码")
    private String returnErrCode;

    @ApiModelProperty("第三方返回的错误记录")
    private String returnErrStr;

    @ApiModelProperty("提交的post数据")
    private String postJson;

    @ApiModelProperty("原始返回的支付结果")
    private String rawResult;

    @ApiModelProperty("支付发起时间")
    private Date addTime;

    @ApiModelProperty("支付成功时间")
    private Date successTime;
}
